from selenium.webdriver.common.by import By
from selenium import webdriver
import time

# 打开游览器和网页
driver = webdriver.Chrome()
driver.get('https://sahitest.com/demo')
# 找到下拉框页面进入
driver.find_element(By.LINK_TEXT,'Select Test').click()
# 定位一个下拉框点击
time.sleep(2)
select = driver.find_element(By.ID,'s1')
# 选择下拉框第二个选项点击
time.sleep(2)
select.find_element(By.XPATH,'//*[@id="s1"]/option[2]').click()
# 关闭游览器
time.sleep(2)
driver.quit()